package com.resourcestore.dao;

import java.util.List;

import com.resourcestore.dao.BaseDao;
import com.resourcestore.model.Department;
import com.resourcestore.utils.tag.Pagination;

public class DepartmentDao extends BaseDao {

	public List<Department> selectDepartment(){
		List<Department> list=this.queryForList("selectDepartment");
		return list;
	}
	
	public List<Department> selectDepartmentPage(Department department,Pagination pagination){
		List<Department> list = this.queryForPage("selectDepartmentPage", department,pagination);
		return list;
	}
	
	public int queryDepartmentNum(Department department) {
		return this.queryNum("selectDepartmentCount", department);
	}
	
	public Department selectDepartmentById(Department department){
		return (Department)this.queryForObject("selectDepartmentById", department);
	}
	
	public void insertDepartment(Department department){
		this.insert("insertDepartment", department);		
	}
	
	public void updateDepartment(Department department){
		this.update("updateDepartment", department);	
	}
	
	public void deleteDepartment(Department department){
		this.delete("deleteDepartment", department);
	}
	
	public void deleteMoreDepartment(Department department){
		this.delete("deleteMoreDepartment", department);
	}
}
